package com.itheima.mapper;

import com.itheima.pojo.Dish;
import com.itheima.pojo.DishFlavor;
import com.itheima.pojo.Setmeal;
import com.itheima.pojo.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wuyiqiang
 * @2022/6/15 10:24
 */
@Mapper
public interface SetmealDishMapper {

 /**
  * 新增套餐菜品
  * @param setmealDishes
  */
 void batchSave(@Param("setmealDishes") List<SetmealDish> setmealDishes);

 /**
  * 根据菜品id查询菜品
  * @param setmealId
  * @return
  */
 @Select("select * from setmeal_dish where setmeal_id=#{setmealId} ;")
 List<SetmealDish> selectByDishId(String setmealId);

 /**
  * 删除菜品
  * @param id
  */
 @Delete("delete from setmeal_dish where setmeal_id=#{setmealId}")
 void deleteBySetmealId(String id);

}
